TZInfo::Timezones with no transitions fail on export
Reported by Rick DeNatale | June 14th, 2009 @ 07:39 PM
Certain time zones have not transitions and therefore no local start time. The following spec for TZInfoTimezone tests that all TZInfo timezone identifiers can be used, and (except for "UTC") will generate a VTIMEZONE component with at least one period.
TZInfo::Timezone.all_identifiers.each do |tz|
context "TZInfo timezone #{tz}" do
before(:each) do
@calendar = RiCal.Calendar do |cal|
cal.event do |event|
event.description = "test"
event.dtstart = "TZID=#{tz}:20090530T123000"
event.dtend = "TZID=#{tz}:20090530T123001"
end
end
end
it "should be allowed as a tzid" do
lambda {@calendar.export}.should_not raise_error
end
unless tz == "UTC"
it "should produce at least one period in the VTIMEZONE" do
@calendar.export.should match(/BEGIN:(STANDARD|DAYLIGHT)/)
end
end
end
end
Comments and changes to this ticket
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A new icalendar data (RFC 2445) gem for Ruby which supports time zones and enumeration of occurrences